package com.github.CharlesSong.web;

import com.github.CharlesSong.service.IUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * Description:
 * Author: CharlesSong
 * Date  : 2015/10/12
 */
@Controller
public class HelloWorldController {

    @Autowired
    private IUserService userService;


    @RequestMapping("/hello")
    @ResponseBody
    public List<Map<String, Object>> hello(){
        List<Map<String,Object>> userList=userService.queryUserList(null);
        return userList;
    }

    @RequestMapping("/")
    public String hellomvc(){
        return "hellomvc";
    }

}
